home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3n / xdr_complex.z / xdr_complex
Encoding:
Text File  |  2002-10-03  |  16.3 KB  |  199 lines

  1.  
  2.  
  3.  
  4. xxxxddddrrrr____ccccoooommmmpppplllleeeexxxx((((3333NNNN))))                                                xxxxddddrrrr____ccccoooommmmpppplllleeeexxxx((((3333NNNN))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _xxxx_dddd_rrrr______cccc_oooo_mmmm_pppp_llll_eeee_xxxx:   _xxxx_dddd_rrrr______aaaa_rrrr_rrrr_aaaa_yyyy, _xxxx_dddd_rrrr______bbbb_yyyy_tttt_eeee_ssss, _xxxx_dddd_rrrr______oooo_pppp_aaaa_qqqq_uuuu_eeee, _xxxx_dddd_rrrr______pppp_oooo_iiii_nnnn_tttt_eeee_rrrr,
  10.      _xxxx_dddd_rrrr______rrrr_eeee_ffff_eeee_rrrr_eeee_nnnn_cccc_eeee, _xxxx_dddd_rrrr______ssss_tttt_rrrr_iiii_nnnn_gggg, _xxxx_dddd_rrrr______uuuu_nnnn_iiii_oooo_nnnn, _xxxx_dddd_rrrr______vvvv_eeee_cccc_tttt_oooo_rrrr, _xxxx_dddd_rrrr______wwww_rrrr_aaaa_pppp_ssss_tttt_rrrr_iiii_nnnn_gggg -
  11.      library routines for external data representation
  12.  
  13. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  14.      XDR library routines allow C programmers to describe complex data
  15.      structures in a machine-independent fashion.  Protocols such as remote
  16.      procedure calls (RPC) use these routines to describe the format of the
  17.      data.  These routines are the XDR library routines for complex data
  18.      structures.  They require the creation of XDR stream [see
  19.      _xxxx_dddd_rrrr______cccc_rrrr_eeee_aaaa_tttt_eeee(3N)].
  20.  
  21.    RRRRoooouuuuttttiiiinnnneeeessss
  22.      See _rrrr_pppp_cccc(3N) for the definition of the _XXXX_DDDD_RRRR data structure.
  23.  
  24.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_rrrr_pppp_cccc_////_xxxx_dddd_rrrr_...._hhhh_>>>>
  25.  
  26.      _bbbb_oooo_oooo_llll______tttt
  27.      _xxxx_dddd_rrrr______aaaa_rrrr_rrrr_aaaa_yyyy_((((_XXXX_DDDD_RRRR _****_xxxx_dddd_rrrr_ssss_,,,, _cccc_aaaa_dddd_dddd_rrrr______tttt _****_aaaa_rrrr_rrrr_pppp_,,,, _uuuu______iiii_nnnn_tttt _****_ssss_iiii_zzzz_eeee_pppp_,,,,
  28.           _cccc_oooo_nnnn_ssss_tttt _uuuu______iiii_nnnn_tttt _mmmm_aaaa_xxxx_ssss_iiii_zzzz_eeee_,,,, _cccc_oooo_nnnn_ssss_tttt _uuuu______iiii_nnnn_tttt _eeee_llll_ssss_iiii_zzzz_eeee_,,,,
  29.           _cccc_oooo_nnnn_ssss_tttt _xxxx_dddd_rrrr_pppp_rrrr_oooo_cccc______tttt _eeee_llll_pppp_rrrr_oooo_cccc_))))_;;;;
  30.  
  31.           _xxxx_dddd_rrrr______aaaa_rrrr_rrrr_aaaa_yyyy translates between variable-length arrays and their
  32.           corresponding external representations.  The parameter _a_r_r_p is the
  33.           address of the pointer to the array, while _s_i_z_e_p is the address of
  34.           the element count of the array; this element count cannot exceed
  35.           _m_a_x_s_i_z_e.  The parameter _e_l_s_i_z_e is the _ssss_iiii_zzzz_eeee_oooo_ffff each of the array's
  36.           elements, and _e_l_p_r_o_c is an XDR routine that translates between the
  37.           array elements' C form and their external representation.  This
  38.           routine returns _1111 if it succeeds, _0000 otherwise.
  39.  
  40.      _bbbb_oooo_oooo_llll______tttt
  41.      _xxxx_dddd_rrrr______bbbb_yyyy_tttt_eeee_ssss_((((_XXXX_DDDD_RRRR _****_xxxx_dddd_rrrr_ssss_,,,, _cccc_hhhh_aaaa_rrrr _****_****_ssss_pppp_,,,, _uuuu______iiii_nnnn_tttt _****_ssss_iiii_zzzz_eeee_pppp_,,,,
  42.           _cccc_oooo_nnnn_ssss_tttt _uuuu______iiii_nnnn_tttt _mmmm_aaaa_xxxx_ssss_iiii_zzzz_eeee_))))_;;;;
  43.  
  44.           _xxxx_dddd_rrrr______bbbb_yyyy_tttt_eeee_ssss translates between counted byte strings and their external
  45.           representations.  The parameter _s_p is the address of the string
  46.           pointer.  The length of the string is located at address _s_i_z_e_p;
  47.           strings cannot be longer than _m_a_x_s_i_z_e.  This routine returns _1111 if it
  48.           succeeds, _0000 otherwise.
  49.  
  50.      _bbbb_oooo_oooo_llll______tttt
  51.      _xxxx_dddd_rrrr______oooo_pppp_aaaa_qqqq_uuuu_eeee_((((_XXXX_DDDD_RRRR _****_xxxx_dddd_rrrr_ssss_,,,, _cccc_aaaa_dddd_dddd_rrrr______tttt _cccc_pppp_,,,, _cccc_oooo_nnnn_ssss_tttt _uuuu______iiii_nnnn_tttt _cccc_nnnn_tttt_))))_;;;;
  52.  
  53.           _xxxx_dddd_rrrr______oooo_pppp_aaaa_qqqq_uuuu_eeee translates between fixed size opaque data and its
  54.           external representation.  The parameter _c_p is the address of the
  55.           opaque object, and _c_n_t is its size in bytes.  This routine returns _1111
  56.           if it succeeds, _0000 otherwise.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. xxxxddddrrrr____ccccoooommmmpppplllleeeexxxx((((3333NNNN))))                                                xxxxddddrrrr____ccccoooommmmpppplllleeeexxxx((((3333NNNN))))
  71.  
  72.  
  73.  
  74.      _bbbb_oooo_oooo_llll______tttt
  75.      _xxxx_dddd_rrrr______pppp_oooo_iiii_nnnn_tttt_eeee_rrrr_((((_XXXX_DDDD_RRRR _****_xxxx_dddd_rrrr_ssss_,,,, _cccc_hhhh_aaaa_rrrr _****_****_oooo_bbbb_jjjj_pppp_pppp_,,,, _uuuu______iiii_nnnn_tttt _oooo_bbbb_jjjj_ssss_iiii_zzzz_eeee_,,,,
  76.           _cccc_oooo_nnnn_ssss_tttt _xxxx_dddd_rrrr_pppp_rrrr_oooo_cccc______tttt _xxxx_dddd_rrrr_oooo_bbbb_jjjj_))))_;;;;
  77.  
  78.           Like _xxxx_dddd_rrrr______rrrr_eeee_ffff_eeee_rrrr_eeee_nnnn_cccc_eeee except that it serializes _NNNN_UUUU_LLLL_LLLL pointers, whereas
  79.           _xxxx_dddd_rrrr______rrrr_eeee_ffff_eeee_rrrr_eeee_nnnn_cccc_eeee does not.  Thus, _xxxx_dddd_rrrr______pppp_oooo_iiii_nnnn_tttt_eeee_rrrr can represent recursive
  80.           data structures, such as binary trees or linked lists.
  81.  
  82.      _bbbb_oooo_oooo_llll______tttt
  83.      _xxxx_dddd_rrrr______rrrr_eeee_ffff_eeee_rrrr_eeee_nnnn_cccc_eeee_((((_XXXX_DDDD_RRRR _****_xxxx_dddd_rrrr_ssss_,,,, _cccc_aaaa_dddd_dddd_rrrr______tttt _****_pppp_pppp_,,,, _uuuu______iiii_nnnn_tttt _ssss_iiii_zzzz_eeee_,,,,
  84.           _cccc_oooo_nnnn_ssss_tttt _xxxx_dddd_rrrr_pppp_rrrr_oooo_cccc______tttt _pppp_rrrr_oooo_cccc_))))_;;;;
  85.  
  86.           _xxxx_dddd_rrrr______rrrr_eeee_ffff_eeee_rrrr_eeee_nnnn_cccc_eeee provides pointer chasing within structures.  The
  87.           parameter _p_p is the address of the pointer; _s_i_z_e is the _ssss_iiii_zzzz_eeee_oooo_ffff the
  88.           structure that *_p_p points to; and _p_r_o_c is an XDR procedure that
  89.           translates the structure between its C form and its external
  90.           representation.  This routine returns _1111 if it succeeds, _0000 otherwise.
  91.  
  92.           Note:  this routine does not understand _NNNN_UUUU_LLLL_LLLL pointers.  Use
  93.           _xxxx_dddd_rrrr______pppp_oooo_iiii_nnnn_tttt_eeee_rrrr instead.
  94.  
  95.      _bbbb_oooo_oooo_llll______tttt
  96.      _xxxx_dddd_rrrr______ssss_tttt_rrrr_iiii_nnnn_gggg_((((_XXXX_DDDD_RRRR _****_xxxx_dddd_rrrr_ssss_,,,, _cccc_hhhh_aaaa_rrrr _****_****_ssss_pppp_,,,, _cccc_oooo_nnnn_ssss_tttt _uuuu______iiii_nnnn_tttt _mmmm_aaaa_xxxx_ssss_iiii_zzzz_eeee_))))_;;;;
  97.  
  98.           _xxxx_dddd_rrrr______ssss_tttt_rrrr_iiii_nnnn_gggg translates between C strings and their corresponding
  99.           external representations.  Strings cannot be longer than _m_a_x_s_i_z_e.
  100.           Note:  _s_p is the address of the string's pointer.  This routine
  101.           returns _1111 if it succeeds, _0000 otherwise.
  102.  
  103.      _bbbb_oooo_oooo_llll______tttt
  104.      _xxxx_dddd_rrrr______uuuu_nnnn_iiii_oooo_nnnn_((((_XXXX_DDDD_RRRR _****_xxxx_dddd_rrrr_ssss_,,,, _eeee_nnnn_uuuu_mmmm______tttt _****_dddd_ssss_cccc_mmmm_pppp_,,,, _cccc_hhhh_aaaa_rrrr _****_uuuu_nnnn_pppp_,,,,
  105.           _cccc_oooo_nnnn_ssss_tttt _ssss_tttt_rrrr_uuuu_cccc_tttt _xxxx_dddd_rrrr______dddd_iiii_ssss_cccc_rrrr_iiii_mmmm _****_cccc_hhhh_oooo_iiii_cccc_eeee_ssss_,,,,
  106.           _cccc_oooo_nnnn_ssss_tttt _bbbb_oooo_oooo_llll______tttt _((((_****_dddd_eeee_ffff_aaaa_uuuu_llll_tttt_aaaa_rrrr_mmmm_))))_((((_cccc_oooo_nnnn_ssss_tttt _XXXX_DDDD_RRRR _****_,,,, _cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _****_,,,,
  107.                _cccc_oooo_nnnn_ssss_tttt _iiii_nnnn_tttt_))))_))))_;;;;
  108.  
  109.           _xxxx_dddd_rrrr______uuuu_nnnn_iiii_oooo_nnnn translates between a discriminated C _uuuu_nnnn_iiii_oooo_nnnn and its
  110.           corresponding external representation.  It first translates the
  111.           discriminant of the union located at _d_s_c_m_p.  This discriminant is
  112.           always an _eeee_nnnn_uuuu_mmmm______tttt.  Next the union located at _u_n_p is translated.  The
  113.           parameter _c_h_o_i_c_e_s is a pointer to an array of _xxxx_dddd_rrrr______dddd_iiii_ssss_cccc_rrrr_iiii_mmmm
  114.           structures.  Each structure contains an ordered pair of [_v_a_l_u_e,
  115.           _p_r_o_c].  If the union's discriminant is equal to the associated
  116.           _v_a_l_u_e, then the _p_r_o_c is called to translate the union.  The end of
  117.           the _xxxx_dddd_rrrr______dddd_iiii_ssss_cccc_rrrr_iiii_mmmm structure array is denoted by a routine of value
  118.           _NNNN_UUUU_LLLL_LLLL.  If the discriminant is not found in the _c_h_o_i_c_e_s array, then
  119.           the _d_e_f_a_u_l_t_a_r_m procedure is called (if it is not _NNNN_UUUU_LLLL_LLLL).  Returns _1111
  120.           if it succeeds, _0000 otherwise.
  121.  
  122.      _bbbb_oooo_oooo_llll______tttt
  123.      _xxxx_dddd_rrrr______vvvv_eeee_cccc_tttt_oooo_rrrr_((((_XXXX_DDDD_RRRR _****_xxxx_dddd_rrrr_ssss_,,,, _cccc_hhhh_aaaa_rrrr _****_aaaa_rrrr_rrrr_pppp_,,,, _cccc_oooo_nnnn_ssss_tttt _uuuu______iiii_nnnn_tttt _ssss_iiii_zzzz_eeee_,,,,
  124.           _cccc_oooo_nnnn_ssss_tttt _uuuu______iiii_nnnn_tttt _eeee_llll_ssss_iiii_zzzz_eeee_,,,, _cccc_oooo_nnnn_ssss_tttt _xxxx_dddd_rrrr_pppp_rrrr_oooo_cccc______tttt _eeee_llll_pppp_rrrr_oooo_cccc_))))_;;;;
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. xxxxddddrrrr____ccccoooommmmpppplllleeeexxxx((((3333NNNN))))                                                xxxxddddrrrr____ccccoooommmmpppplllleeeexxxx((((3333NNNN))))
  137.  
  138.  
  139.  
  140.           _xxxx_dddd_rrrr______vvvv_eeee_cccc_tttt_oooo_rrrr translates between fixed-length arrays and their
  141.           corresponding external representations.  The parameter _a_r_r_p is the
  142.           address of the pointer to the array, while _s_i_z_e is the element count
  143.           of the array.  The parameter _e_l_s_i_z_e is the _ssss_iiii_zzzz_eeee_oooo_ffff each of the
  144.           array's elements, and _e_l_p_r_o_c is an XDR routine that translates
  145.           between the array elements' C form and their external
  146.           representation.  This routine returns _1111 if it succeeds, _0000 otherwise.
  147.  
  148.      _bbbb_oooo_oooo_llll______tttt
  149.      _xxxx_dddd_rrrr______wwww_rrrr_aaaa_pppp_ssss_tttt_rrrr_iiii_nnnn_gggg_((((_XXXX_DDDD_RRRR _****_xxxx_dddd_rrrr_ssss_,,,, _cccc_hhhh_aaaa_rrrr _****_****_ssss_pppp_))))_;;;;
  150.  
  151.           A routine that calls _xxxx_dddd_rrrr______ssss_tttt_rrrr_iiii_nnnn_gggg_((((_x_d_r_s_,,,, _s_p_,,,, _m_a_x_u_i_n_t_))))_;;;; where _m_a_x_u_i_n_t is
  152.           the maximum value of an unsigned integer.
  153.  
  154.           Many routines, such as _xxxx_dddd_rrrr______aaaa_rrrr_rrrr_aaaa_yyyy, _xxxx_dddd_rrrr______pppp_oooo_iiii_nnnn_tttt_eeee_rrrr and _xxxx_dddd_rrrr______vvvv_eeee_cccc_tttt_oooo_rrrr take a
  155.           function pointer of type _xxxx_dddd_rrrr_pppp_rrrr_oooo_cccc______tttt, which takes two arguments.
  156.           _xxxx_dddd_rrrr______ssss_tttt_rrrr_iiii_nnnn_gggg, one of the most frequently used routines, requires three
  157.           arguments, while _xxxx_dddd_rrrr______wwww_rrrr_aaaa_pppp_ssss_tttt_rrrr_iiii_nnnn_gggg only requires two.  For these
  158.           routines, _xxxx_dddd_rrrr______wwww_rrrr_aaaa_pppp_ssss_tttt_rrrr_iiii_nnnn_gggg is desirable.  This routine returns _1111 if it
  159.           succeeds, _0000 otherwise.
  160.  
  161. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  162.      _rrrr_pppp_cccc(3N), _xxxx_dddd_rrrr______aaaa_dddd_mmmm_iiii_nnnn(3N), _xxxx_dddd_rrrr______cccc_rrrr_eeee_aaaa_tttt_eeee(3N), _xxxx_dddd_rrrr______ssss_iiii_mmmm_pppp_llll_eeee(3N)
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.